package thread.synchronization;
//Program of synchronized method by using annonymous class  
//In this program, we have created the two threads by annonymous class, so less coding is required.
class  AnnonymousClassSynchroniztion{
	synchronized void printTable(int n){
		for(int i=1;i<=5;i++){
			System.out.println(n*i);
			try{
				Thread.sleep(500);
			}catch (Exception e){
				System.out.println(e);
			}
		}
	}
}


